<?php
namespace Admin\Model;
use Think\Model\RelationModel;
class BannerModel extends RelationModel {
     protected $_link = array(         
           'banner_point'  =>  array(             
            'mapping_type'      => self::BELONGS_TO,  //关联表之间的关系          
            'class_name'        => 'banner_point', //要关联的附表
            'foreign_key'       =>'point_id',//关联条件
            'mapping_fields'    =>'name',

                 ),         
            
            );


   }